<!--
 * @FileDescription:
 -->
<script setup lang="ts">
import { useDefineDataSourceStore } from '@/stores/defineDataSourceList.ts';

defineOptions({
  inheritAttrs: false, // 允许用户透传属性到 TableBase
});

// pinia
const PolicyStore = useDefineDataSourceStore();
const refresh = async () => {
  await PolicyStore.PolicyList.reload();
};
</script>

<template>
  <PolicyTable
    :data="PolicyStore.PolicyList.data"
    :cols="['name', 'type', 'time']"
    :error-msg="PolicyStore.PolicyList.err"
    :onRefresh="refresh"
    :retry-fn="refresh"
    empty-text="暂无相关的政策法规信息"
    remote-pagin
    v-bind="$attrs"
  >
  </PolicyTable>
</template>

<style scoped></style>
